Search
All commands related to the search feature.
find ⇒ JSON
Find a word or multiple word.
| Param | Type | Description |
|---|---|---|
| query | string | Search query |
| caseSensitive | bool | Toggle case sensitive |
| entireWord | bool | Toogle entire word highlighting |
| highlightAll | bool | Toggle highlight all words occurences from the search phrase in the document |
| previous | bool | Find the previous word |
Example
TFTPDFGadget.callCommand({
name: 'find',
args: {
query: 'Enter a query here',
caseSensitive: false,
entireWord: true,
highlightAll: false,
previous: false,
},
callback: myfunc,
});
findNext
Find the next occurrence.
Example
TFTPDFGadget.callCommand({ name: 'findNext', callback: myfunc });
findPrevious
Find the previous occurrence.
Example
TFTPDFGadget.callCommand({ name: 'findPrevious', callback: myfunc });
changeFindOption ⇒ JSON
Add or remove an option to the current search result.
| Param | Type | Description |
|---|---|---|
| name | string | caseSensitive - entireWord - highlightAll |
| value | bool | Enable/Disable the search mode |
Available find's name options:
- caseSensitive: Enable/Disable the case sensitive mode.
- entireWord: Enable/Disable the entire word mode.
- highlightAll: : Highlight all the occurence or 1 per 1 occurence.
Example
TFTPDFGadget.callCommand({
name: 'changeFindOption',
args: { name: 'caseSensitive', value: false },
callback: myfunc,
});